package com.wenx.v3system.modular.cloud.domain.dto;

import com.wenx.base.domain.BaseDto;
import com.wenx.v3core.enums.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.util.List;

/**
 * 系统角色DTO
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "系统角色信息")
public class SysRoleDto extends BaseDto {

    @NotBlank(message = "角色名称不能为空")
    @Size(max = 100, message = "角色名称长度不能超过100个字符")
    @Schema(description = "角色名称", example = "管理员")
    private String name;

    @NotBlank(message = "角色编码不能为空")
    @Size(max = 50, message = "角色编码长度不能超过50个字符")
    @Schema(description = "角色编码", example = "ADMIN")
    private String code;

    @Size(max = 500, message = "角色描述长度不能超过500个字符")
    @Schema(description = "角色描述", example = "系统管理员角色")
    private String description;

    @Schema(description = "角色状态", example = "ENABLED")
    private StatusEnum status;

    // 关联关系
    @Schema(description = "角色权限列表")
    private List<SysPermissionDto> permissions;

    @Schema(description = "角色菜单列表")
    private List<SysMenuDto> menus;

    @Schema(description = "角色用户列表")
    private List<SysUserDto> users;
}
